<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html >
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"  />
	<link rel="stylesheet" type="text/css" href="js/select2/select2.css"  />
	<style type="text/css">
		#container{
			margin-top:65px;
		}
	</style>
</head>
<body>
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a href="#" class="brand">凯盛项目管理系统</a>
			</div>
		</div>
	</div>
	<div class="container" id="container">
		<div class="row">
			<div class="span9">
				<form class="form-horizontal" action="project.jspx?m=add" method="post" id="myform">
					<fieldset>
						<legend>开始一个新项目</legend>
						<div class="control-group">
							<label class="control-label" >项目名称</label>
							<div class="controls">
								<input type="text" class="span5" name="name"  />
								<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" >项目描述</label>
							<div class="controls">
								<textarea class="span5" rows="4" name="desc"></textarea>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" >负责人</label>
							<div class="controls">
								<select name="manger" id="manger" class="e1" style="width:300px">
									<c:forEach items="${list }" var="e">
										<option value="${e.id }">${e.username }</option>
									</c:forEach>
								</select>
							</div>
						</div>
						<input type="hidden" name="workers" id="workers"/>
						<div class="control-group">
							<label class="control-label" >项目成员</label>
							<div class="controls">
								<select name="worker" id="worker" multiple class="e1" style="width:300px">
									<c:forEach items="${list }" var="e">
										<option value="${e.id }">${e.username }</option>
									</c:forEach>
								</select>
							</div>
						</div>
						<div class="form-actions" style="background-color:#eee">
							<button class="btn btn-primary" id="btnSave">保存</button>
							<button class="btn">返回</button>
						</div>
					</fieldset>
				</form>
			</div>
			<div class="span3"></div>
		</div>
	</div>
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/select2/select2.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$(".e1").select2();
			$("#btnSave").click(function(){
				var v = $("#worker").select2("val");
				$("#workers").val(v);
				$("#myform").submit();
			});
		});
	</script>
</body>
</html>